<?php
$this->breadcrumbs = array(
    '查看数据',
);
?>

<?php echo CHtml::linkButton('下载数据', array( 
   'submit'=>array('resource/download', 'id'=>$_GET['id']), 
   'confirm'=>"确定要下载所有数据吗？", 
)); ?>  

<?php $this->widget('bootstrap.widgets.TbGridView', array(
    'type'=>'striped bordered condensed',
    'dataProvider'  =>  $dataProvider,
    'pager'=>array(
        'class'=>'CLinkPager',           
        'nextPageLabel'=>'下一页',           
        'prevPageLabel'=>'上一页',           
        'header'=>'',   
    ),   
    'enableSorting' => true,
    'summaryText'   =>  '显示{start}-{end}条.共{count}条记录,当前第{page}页',
    'template'      =>  '{items}{pager}',
    'columns'       =>  array(
        array(
            'header'  =>  '时间',
            'name'    =>  'tv_sec',
            'value' =>  'date("Y-m-d H:i:s", $data["tv_sec"])'
        ),
        array(
            'header'  =>  '用户标识',
            'name'    =>  'mid',
            'value' =>  '$data["mid"]'
        ),
        array(
            'header'  =>  'IP地址',
            'name'    =>  'ip',
            'value' =>  '$data["ip"]'
        ),
        array(
            'header'  =>  '安全等级',
            'name'  =>  'level',
            'value' =>  'SecurityLevel::$names[$data["level"]]',
        ),
        array(
            'header'  =>  '文件路径',
            'name'    =>  'path',
            'value' =>  'urldecode($data["path"])'
        ), 
    ),
));
?>
